package com.engr.exception;

import java.util.Map;

/**
 * 顶级异常类
 * 
 * @Auther: lzw
 * @Date: 2018/6/4
 */
public class BaseException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int code;
	private String message;
	private Map<String, Object> errorMap;

	public BaseException(int code, String message) {
		super(message);
		this.code = code;
		this.message = message;
	}

	public BaseException(int code, String message, Map<String, Object> errorMap) {
		super(message);
		this.code = code;
		this.message = message;
		this.errorMap = errorMap;
	}

	public BaseException(String message, Throwable cause) {
		super(message, cause);
	}

	public BaseException(String message) {
		super(message);
	}

	public BaseException(Throwable cause) {
		super(cause);
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Map<String, Object> getErrorMap() {
		return errorMap;
	}

	public void setErrorMap(Map<String, Object> errorMap) {
		this.errorMap = errorMap;
	}
}
